<?php 

include './../../functions.php';

require '../smarty/libs/Smarty.class.php';

//实例化smarty
$smarty = new Smarty();
//模板目录
$smarty->template_dir = "template";
//编译目录
$smarty->compile_dir = "temp/compile";
//开始定界符
$smarty->left_delimiter = "{";
//结束定界符
$smarty->right_delimiter = "}";

$hd = "我是smarty";
//分配变量
$smarty->assign("hd",$hd);

$arr = array( 
	'username'=>'子钦',
	'sex'=>'男',
	'arr1'=>array(
		'name'=>'朱莹',
	),
);
//分配变量
$smarty->assign('arr',$arr);


session_start();
$_SESSION['username'] = "admin";


//常量
define("App","./www.com");

setcookie("houdun","后盾网",time()+3600,"/");


//$c63="";
$c63 = null;
$smarty->assign('c63',$c63);


$hello = "wo  shi  shui";
$smarty->assign('hello',$hello);


$str = "aaaaaaaaddd";
$str = "后盾网人人做后盾";
$smarty->assign("str",$str);


$arr = array(
		'username'=>'子钦',
		'sex'=>'男1',
		'age'=>10,
	);
$smarty->assign('arr',$arr);



$arr1 = array(
	array(
		'username'=>'子钦',
		'sex'=>'男1',
		'age'=>10,
	),
	array(
		'username'=>'子钦',
		'sex'=>'男2',
		'age'=>11,
	),
	array(
		'username'=>'子钦',
		'sex'=>'男3',
		'age'=>12,
	),
	array(
		'username'=>'子钦',
		'sex'=>'男4',
		'age'=>13,
	),
);
$smarty->assign('arr1',$arr1);







//载入模板
$smarty->display("index.html");












